<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
    <script>
        function* test() {
            yield getData();
            console.log(res);
            yield '结束了'
        };
        let result = test()
        result.next();

        // 发异步请求
        function getData() {
            // $.get(url,params:{},(success)+>{})
            $.get('http://121.199.0.35:8888/index/article/findCategoryArticles', (success) => {
                result.next(response, '获取成功');
            })
        }
    </script>
</head>

<body>

</body>

</html>